<?php
/*$this->breadcrumbs=array(
	'Words'=>array('index'),
	$model->wid,
);*/

$this->menu=array(
	array('label'=>'List Word', 'url'=>array('index')),
	array('label'=>'Create Word', 'url'=>array('create')),
	array('label'=>'Update Word', 'url'=>array('update', 'id'=>$model->wid)),
	array('label'=>'Delete Word', 'url'=>'#', 'linkOptions'=>array('submit'=>array('delete','id'=>$model->wid),'confirm'=>'Are you sure you want to delete this item?')),
	array('label'=>'Manage Word', 'url'=>array('admin')),
);

function speechname($speechid){
	$speechmodel = Speech::model()->findByPk($speechid);
	return $speechmodel->abbreviation;
}

function catalogname($catalogid){
	$catalogmodel = Catalog::model()->findByPk($catalogid);
	return $catalogmodel->cataname;
}

?>

<h1>View Word #<?php echo $model->wid; ?></h1>

<?php $this->widget('zii.widgets.CDetailView', array(
	'data'=>$model,
	'attributes'=>array(
		'wid',
		'spell',
		'phonetic',
		array(
			'label'=>'sid',
			'type'=>'text',
			'value'=>speechname($model->sid),
		),
		'chinese',
		array(
			'label'=>'cid',
			'type'=>'text',
			'value'=>catalogname($model->cid),
		),
		'sentence',
		'sound',
		'slow_sound',
		'sentence_sound',
	),
)); ?>
